{% extends "base.html" %}
{% block page %}
    <div class="div" style="margin-top: 1%"><p>线上MYSQL数据库列表</p></div>
    <div style="width: 99%;">
         <table class="table table-hover table-striped table-condensed table-bordered" id="data_table">
            <thead>
                <tr style="font-weight: bold">
                    {% for t in tables %}
                        <td style="text-align: center">{{ t }}</td>
                    {% endfor %}
                </tr>
            </thead>
            <tbody>
                {% for value in values %}
                    <tr class="altrow">
                        <td style="text-align: center;vertical-align:middle;">{{value[0]}}&nbsp;<a href="/mysql_status/{{ value[:2]|join(':') }}" style="color:tomato"><i class="fas fa-chart-line"></i></a></td>
                        <td style="text-align: center;vertical-align:middle;">{{value[1]}}</td>
                        <td style="text-align: center;vertical-align:middle;">
                            {% for db in value[2].split(',') %}
                                <a href="/tables/{{ db }}">{{ db }}</a><br>
                            {% endfor %}
                        </td>
                        <td style="text-align: center;vertical-align:middle;">
                            {% for info in value[-1] %}
                                {{ info }}&nbsp;<a href="/mysql_status/{{ info }}" style="color:tomato"><i class="fas fa-chart-line"></i></a><br>
                            {% endfor %}
                        </td>
                    </tr>
                {% endfor %}
            </tbody>
         </table>
    </div>
    <script>
        (document).ready(table_data('data_table'));
    </script>
{% endblock page %}